//
//  Hot_cityCollectionViewCell.m
//  AroundTheWorld
//
//  Created by dllo on 16/5/19.
//  Copyright © 2016年 IfelseGo an. All rights reserved.
//

#import "Hot_cityCollectionViewCell.h"
#define WIDTH self.contentView.frame.size.width
#define HEIGHT self.contentView.frame.size.height
@implementation Hot_cityCollectionViewCell


-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self doSometing];
    }
    return self;
}

-(void)doSometing{
    
    self.photoImageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    self.photoImageV.backgroundColor = [UIColor whiteColor];
    [self.contentView addSubview:self.photoImageV];
    UIImageView *black = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, HEIGHT)];
    black.backgroundColor = [UIColor blackColor];
    black.alpha = 0.4;
    [self.contentView addSubview:black];
    
    self.cnnameLabel = [self addLabel:20];
    self.cnnameLabel.frame = CGRectMake(WIDTH / 180 * 20, HEIGHT / 105 * 25, WIDTH / 180 * 140, HEIGHT / 105 * 33);
    
    self.ennameLabel = [self addLabel:14];
    self.ennameLabel.frame = CGRectMake(WIDTH / 180 * 20, HEIGHT / 105 * 50, WIDTH / 180 * 140, HEIGHT / 105 * 20);
    
}

- (UILabel *)addLabel:(NSInteger )fontSize{
    UILabel *label = [[UILabel alloc] init];
    label.alpha = 0.9;
    label.backgroundColor = [UIColor clearColor];
    label.textColor = [UIColor whiteColor];
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont systemFontOfSize:fontSize];
    [self.contentView addSubview:label];
    return label;
}



@end
